package com.hd123.jixia.api;

import java.util.ArrayList;
import java.util.List;

/**
 * 权限对象定义
 *
 * Date: 2021/11/17 15:29
 *
 * @author zhangxin
 * @email zhangxin@hd123.com
 */
public class PowerNode {

  private PowerDefinition parentNode;
  private PowerDefinition node;
  private List<PowerNode> childNodes = new ArrayList<>();

  /**
   * 父节点
   */
  public PowerDefinition getParentNode() {
    return parentNode;
  }

  public void setParentNode(PowerDefinition parentNode) {
    this.parentNode = parentNode;
  }

  /**
   * 当前节点
   */
  public PowerDefinition getNode() {
    return node;
  }

  public void setNode(PowerDefinition node) {
    this.node = node;
  }

  /**
   * 子节点列表，懒加载模式
   */
  public List<PowerNode> getChildNodes() {
    return childNodes;
  }

  public void setChildNodes(List<PowerNode> childNodes) {
    this.childNodes = childNodes;
  }

  public static class PowerDefinition {
    private String id;
    private String name;

    public PowerDefinition() {
      super();
    }

    public PowerDefinition(String id, String name) {
      super();
      this.id = id;
      this.name = name;
    }

    /**
     * 角色id
     */
    public String getId() {
      return id;
    }

    public void setId(String id) {
      this.id = id;
    }

    /**
     * 角色名称
     */
    public String getName() {
      return name;
    }

    public void setName(String name) {
      this.name = name;
    }

  }
}
